#import <UIKit/UIKit.h>

@protocol DatabaseObjectDataSource <NSObject>

@required

@property (readonly) NSArray *databaseObjectArray;

@property (readonly) NSString *name;
@property (readonly) NSString *navigationBarName;
//@property (readonly) UIImage *tabBarImage;

@property (readonly) CGFloat rowHeight;
@property (readonly) BOOL showSectioned;

@property (readonly) BOOL extraRowAtTop;
@property (readonly) BOOL extraRowAtBottom;

-(void)loadData;
-(void)unloadData;

-(UITableViewCell*)tableView:(UITableView *)tableView cellForObject:(id)obj atIndexPath:(NSIndexPath*)indexPath;

@optional

-(UITableViewCell*)tableView:(UITableView *)tableView cellForExtraRowAtTopIndexPath:(NSIndexPath*)indexPath;
-(UITableViewCell*)tableView:(UITableView *)tableView cellForExtraRowAtBottomIndexPath:(NSIndexPath*)indexPath;

-(id<DatabaseObjectDataSource>)tableView:(UITableView *)tableView dataSourceForSelectedExtraRowAtTopIndexPath:(NSIndexPath*)indexPath;
-(id<DatabaseObjectDataSource>)tableView:(UITableView *)tableView dataSourceForSelectedExtraRowAtBottomIndexPath:(NSIndexPath*)indexPath;

-(id<DatabaseObjectDataSource>)tableView:(UITableView *)tableView dataSourceForSelectedObject:(id)obj atIndexPath:(NSIndexPath *)indexPath;
-(id)tableView:(UITableView *)tableView viewControllerForSelectedObject:(id)obj atIndexPath:(NSIndexPath *)indexPath;
@end